package it.win4buy.presentations
{
    import flash.events.IEventDispatcher;

    import it.win4buy.entities.PlaceHolderVO;
    import it.win4buy.events.UtilityEvent;
    import it.win4buy.models.ApplicationModel;
    import it.win4buy.utility.LoggerUtilty;

    import mx.collections.ArrayCollection;

    /**
     *
     *	autore:
     *  pierangelo.mancusi@gmail.com
     *
     */

    public class InfoPlayViewPM
    {


        //-------------------------------------------
        //
        // Injected properties
        //
        //-------------------------------------------

        [Dispatcher]
        public var dispatcher:IEventDispatcher;

        [Inject]
        public var applicationModel:ApplicationModel;

        [Inject]
        public var log:LoggerUtilty;


        //-------------------------------------------
        //
        // Private Properties
        //
        //-------------------------------------------

        /**
         *PlaceHolderList
         */
        private var _placeholderList:ArrayCollection=null;


        /**
         *PlaceHolder in which the player's playing
         */
        private var _placeHolderPlaying:PlaceHolderVO=null;


        /**
         *Question's number playing.
         */
        private var _questionSelected:int=0;



        /**
         *Time elapsed from the Question's <b>start</b>
         */
        private var _timeCountDown:String="";


        /**
         *Number of trying remain.
         */
        private var _numTrying:int=0;



        /**
         * Help Try number
         */
        private var _numHelp:int=0;


        //-------------------------------------------
        //
        // Getters / Setters
        //
        //-------------------------------------------
        [Bindable]

        /**
         * Help Try number
         */
        public function get numHelp():int
        {
            return _numHelp;
        }

        public function set numHelp(value:int):void
        {
            _numHelp=value;
        }

        [Bindable]
        /**
         *Number of trying remain.
         */
        public function get numTrying():int
        {
            return _numTrying;
        }

        public function set numTrying(value:int):void
        {
            _numTrying=value;
        }

        [Bindable]

        /**
         *Time elapsed from the Question's <b>start</b>
         */
        public function get timeCountDown():String
        {
            return _timeCountDown;
        }

        public function set timeCountDown(value:String):void
        {
            _timeCountDown=value;
        }

        [Bindable]
        /**
         *Question's number playing.
         */

        public function get questionSelected():int
        {
            return _questionSelected;
        }

        public function set questionSelected(value:int):void
        {
            _questionSelected=value;
        }

        [Bindable]
        /**
         *PlaceHolder in which the player's playing.
         */
        public function get placeHolderPlaying():PlaceHolderVO
        {
            return _placeHolderPlaying;
        }

        public function set placeHolderPlaying(value:PlaceHolderVO):void
        {
            _placeHolderPlaying=value;
        }

        [Bindable]
        public function get placeholderList():ArrayCollection
        {
            return _placeholderList;
        }

        public function set placeholderList(value:ArrayCollection):void
        {
            _placeholderList=value;
        }

        //-------------------------------------------
        //
        // Constructor
        //
        //-------------------------------------------

        public function InfoPlayViewPM()
        {
        }


        [PostContruct]
        public function init():void
        {


        }

        //-------------------------------------------
        //
        // Mediator Handlers
        //
        //-------------------------------------------

        [EventHandler(event="UtilityEvent.REFRESH_BINDING", priority="990")]
        /**
         * Refresh bindings.
         *
         *
         */
        public function refreshBindigs(event:UtilityEvent):void
        {
            log.logToConsole(this, "refreshBindigs of the InfoView..");



        }

        //-------------------------------------------
        //
        // Public Methods
        //
        //-------------------------------------------


        //-------------------------------------------
        //
        // Private Methods
        //
        //-------------------------------------------


    }
}